package backend.inst;

import backend.value.TarValue;

import java.util.ArrayList;
import java.util.List;

public class MipsInst extends MipsEntry {
    private final String instName;
    private final List<TarValue> values = new ArrayList<>();

    public MipsInst(String instName, TarValue... values) {
        this.instName = instName;
        this.values.addAll(List.of(values));
    }

    @Override
    public String toString() {
        return String.format("%-6s ", instName) +
                String.join(", ", values.stream().map(TarValue::toString).toList());
    }
}
